(function() {"use strict";var __module = CC_EDITOR ? module : {exports:{}};var __filename = 'preview-scripts/assets/Script/startShopListView.js';var __require = CC_EDITOR ? function (request) {return cc.require(request, require);} : function (request) {return cc.require(request, __filename);};function __define (exports, require, module) {"use strict";
cc._RF.push(module, 'ff3d1xjGutD9pPmeUJD+2K3', 'startShopListView', __filename);
// Script/startShopListView.js

'use strict';

var _XmlHttpTool = require('./XmlHttpTool');

var _XmlHttpTool2 = _interopRequireDefault(_XmlHttpTool);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var shopItem2 = cc.Class({
    name: 'shopItemtwo',
    properties: {

        shopImageUrl: cc.String,
        shopName: cc.String,
        shopStatus: cc.Integer,
        chargeBtn: cc.Node,
        shopStar: cc.String
    }
});

cc.Class({
    extends: cc.Component,

    properties: {

        items: {
            default: [],
            type: shopItem2
        }, //代码几个item格子 初始化
        closeShopBtn: cc.Node,
        scrollShopScrollView: cc.Node,
        itemPrefab: cc.Prefab, //预制节点 代表cell内容详情
        markView: cc.Node,
        shopClose: cc.Button
    },

    onLoad: function onLoad() {

        this.markView.on('touchstart', function (event) {
            console.log("点击结算背景层");
        }, this);

        var that = this;
        _XmlHttpTool2.default.NhttpPost("/marmot/prize_list", {}, function (res) {
            console.log("星币商城请求成功", res);
            that.items = res;
            for (var i = 0; i < that.items.length; ++i) {

                var item = cc.instantiate(that.itemPrefab);
                that.node.addChild(item);
                item.getComponent('startGameitem').init(that.items[i]);
            }
        }, function (failres) {

            console.log("星币商城请求错误", failres);
        });
    },


    closeShopClick: function closeShopClick() {

        console.log("关闭购物车");

        var changebig = cc.scaleTo(0.02, 1.2);

        var finish = cc.callFunc(function () {

            var that = this;
            var changesmail = cc.scaleTo(0.08, 1.0);

            var smaillfinish = cc.callFunc(function () {

                that.scrollShopScrollView.active = false;
            });

            var seq2 = cc.sequence(changesmail, smaillfinish);
            this.closeShopBtn.runAction(seq2);
        }, this);

        var seq = cc.sequence(changebig, finish);

        this.closeShopBtn.runAction(seq);
    },

    start: function start() {}
}

// update (dt) {},
);

cc._RF.pop();
        }
        if (CC_EDITOR) {
            __define(__module.exports, __require, __module);
        }
        else {
            cc.registerModuleFunc(__filename, function () {
                __define(__module.exports, __require, __module);
            });
        }
        })();
        //# sourceMappingURL=startShopListView.js.map
        